
package ch.hearc.coursJava.kitBase.de.wrapperPerso;

import java.util.Set;
import java.util.TreeSet;

public class UseIntegers
	{

	/*------------------------------------------------------------------*\
	|*							Methodes Public							*|
	\*------------------------------------------------------------------*/

	public static void main(String[] args)
		{
		main();
		}

	public static void main()
		{
		testsBasic();
		exempleSetOrdoner();
		}

	/*------------------------------------------------------------------*\
	|*							Methodes Private						*|
	\*------------------------------------------------------------------*/

	private static void testsBasic()
		{
		Integers valeur3 = new Integers(3);
		System.out.println(valeur3.toString());
		System.out.println(valeur3);

		Integers valeur3bis = new Integers(3);
		System.out.println(valeur3.equals(valeur3bis));

		System.out.println(valeur3.equals("coucou"));

		Integers valeur4 = new Integers(4);
		System.out.println(valeur3.equals(valeur4));
		}

	private static void exempleSetOrdoner()
		{
		int n = 10;
		Set<Integers> set = new TreeSet<Integers>();

		for(int i = n; i >= 1; i--)
			{
			set.add(new Integers(i));
			}

		System.out.println(set);
		}
	}
